package structureType.composite.employ.impl;

import structureType.composite.employ.IEmployer;

public class ProgrammerImpl extends IEmployer {

    public ProgrammerImpl(String name) {
        super.setName(name);
        super.employers = null;// 程序员, 表示没有下属了
    }

    @Override
    public void add(IEmployer employer) {
        throw new RuntimeException("I can add employ!");
    }

    @Override
    public void delete(IEmployer employer) {
        throw new RuntimeException("I can delete employ!");
    }

    @Override
    public void employerInfo() {
        System.out.println("I am programer -->" + this.getName());
    }
}